#ifndef SCANNER_H
#define SCANNER_H

#include <QByteArray>
#include <QFile>
#include <QVector>
#include <QString>
#include <QTextStream>

#include "character.h"
#include "word.h"

class Scanner
{
public:
    Scanner();

    virtual bool ScanChar(QVector<Character>&);
    virtual bool ScanWord(QVector<Word>&, _variety_word);
    virtual bool ScanWord(QVector<Word>&, 单词类型);
    virtual QString ScanFile(QByteArray filePath);

protected:
    bool SetFile(QByteArray fileName);

private:
    QFile file;
    QTextStream into;
    static QByteArray path_character;   // 存放字符的文件路径
    static QByteArray path_word[9];     // 存放单词的文件路径
};

#endif // SCANNER_H
